const url = require('url')

console.log(url.parse("http://www.xxxx.com:3000/a/b/c?user=1243&dcd=34#abc"));

let urlObj = {
    protocol:"http",
    host:"www.xxx.com:9527",
    hostname:"www.xxx.com",
    port:"9527",
    hash:"#12233",
    query:"a=1&b=2",
    pathname:"/a/b/d",
    path:"/a/b/d?a=1&b=2",
    search:"?a=1&b=2"
}
console.log(url.format(urlObj))